{if isset($error_msg)}
{$error_msg}
{/if}
<script type="text/javascript" src="{$DESIGN_PATH}files/script.js"></script>
<form action="{$REQUEST_URI}" method="post" enctype="multipart/form-data" accept-charset="UTF-8">
	<fieldset>
		<legend>{lang values="common|publication_period"}</legend>
		<dl>
			<dt><label for="start">{lang values="common|start_date"}</label></dt>
			<dd>{$start_date}</dd>
			<dt><label for="end">{lang values="common|end_date"}</label></dt>
			<dd>{$end_date}</dd>
		</dl>
		<p>
			{lang values="common|date_description"}
		</p>
	</fieldset>
	<fieldset>
		<legend>{lang values="files|file_statements"}</legend>
		<dl>
			<dt><label for="link_title">{lang values="files|link_title"}</label></dt>
			<dd><input type="text" name="form[link_title]" id="link_title" value="{$form.link_title}" maxlength="120" /></dd>
			<dt><label>{lang values="files|filename"}</label></dt>
			<dd><input type="text" value="{$current_file}" disabled="disabled" /></dd>
			<dt><label for="file-internal">{lang values="files|new_file"}</label></dt>
			<dd>
				<label for="external">
					<input type="checkbox" name="form[external]" id="external" value="1" class="checkbox"{$checked_external} />
					{lang values="files|external_resource"}
				</label>
				<input type="file" name="file_internal" id="file-internal" value="{$form.file_internal}" />
				<input type="text" name="form[file_external]" id="file-external" value="" maxlength="120" />
			</dd>
		</dl>
		<dl id="external-filesize" class="hide">
			<dt><label for="filesize">{lang values="files|filesize"}</label></dt>
			<dd>
				<input type="text" name="form[filesize]" id="filesize" value="{$form.filesize}" maxlength="15" style="width:49%;display:inline" />
				<select name="form[unit]" id="unit" style="width:49%;display:inline">
					<option value="">{lang values="common|pls_select"}</option>
{foreach from=$units item=row}
					<option value="{$row.value}"{$row.selected}>{$row.value}</option>
{/foreach}
				</select>
			</dd>
		</dl>
		<dl>
			<dt><label for="text">{lang values="common|description"}</label></dt>
			<dd>{wysiwyg name="text" value="`$form.text`" height="200" toolbar="simple"}</dd>
			<dt><label for="cat">{lang values="common|category"}</label></dt>
			<dd>
				<select name="form[cat]" id="cat">
					<option value="">{lang values="common|pls_select"}</option>
{foreach from=$categories item=row}
					<option value="{$row.id}"{$row.selected}>{$row.name}</option>
{/foreach}
				</select>
			</dd>
		</dl>
	</fieldset>
	<div class="form-bottom">
		<input type="submit" name="submit" value="{lang values="common|submit"}" class="form" />
	</div>
</form>